{% extends "admin/base_site.html" %}
{% load admin_urls i18n static %}

{% block extrastyle %}{{ block.super }}{% endblock %}

{% block content %}
    <div id="content-main">
        <form{% if form_url %} action="{{ form_url }}"{% endif %} method="post" id="{{ opts.model_name }}_form">{% csrf_token %}{% block form_top %}{% endblock %}
            <input type="text" name="username" value="{{ original.get_username }}" class="hidden">

            <div>
                {% if is_popup %}
                    <input type="hidden" name="{{ is_popup_var }}" value="1">
                {% endif %}

                {% include "unfold/helpers/messages/errornote.html" with errors=form.errors %}

                {% translate "Please enter your old password, for security’s sake, and then enter your new password twice so we can verify you typed it in correctly." as message %}

                {% include "unfold/helpers/messages/info.html" with message=message %}

                <fieldset class="fieldset group border border-base-200 mb-6 rounded-default shadow-xs p-3 dark:border-base-800 *:last:mb-0">
                    {% include "unfold/helpers/field.html" with field=form.old_password %}

                    {% include "unfold/helpers/field.html" with field=form.new_password1 %}

                    {% include "unfold/helpers/field.html" with field=form.new_password2 %}
                </fieldset>

                <div class="flex justify-end">
                    <button type="submit" class="bg-primary-600 border border-transparent font-medium px-3 py-2 rounded-default text-sm text-white">
                        {% translate 'Change password' %}
                    </button>
                </div>
            </div>
        </form>
    </div>
{% endblock %}
